package com.mysteel.monitor.core.utils;

import java.io.BufferedReader;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.List;

public class IOUtils {

    public static List<String> streamTOstr(InputStream input) throws Exception {
        if (input == null) {
            throw new Exception("输入流为null");
        }
        List<String> list = new ArrayList<>();
        BufferedReader reader = new BufferedReader(new InputStreamReader(input));
        String y="";
        //一行一行读zd
        while((y=reader.readLine())!=null){
            list.add(y.replace(" ","&nbsp;&nbsp;"));
        }
        return  list;
    }

}
